Import data
meteorites <- read_csv(
"Meteorite_Landings.csv",
col_types = cols(year = col_character())
) %>%
rename (mass = `mass (g)` ) %>%
mutate(
date = as.POSIXct(year,format="%d/%m/%Y %H:%M:%OS"),
recency = 2020 - lubridate::year(date)
)
kable(head(meteorites, 7))
| Aachen |
1 |
Valid |
L5 |
21 |
Fell |
01/01/1880 12:00:00 AM |
50.77500 |
6.08333 |
(50.775, 6.08333) |
1880-01-01 12:00:00 |
140 |
| Aarhus |
2 |
Valid |
H6 |
720 |
Fell |
01/01/1951 12:00:00 AM |
56.18333 |
10.23333 |
(56.18333, 10.23333) |
1951-01-01 12:00:00 |
69 |
| Abee |
6 |
Valid |
EH4 |
107000 |
Fell |
01/01/1952 12:00:00 AM |
54.21667 |
-113.00000 |
(54.21667, -113.0) |
1952-01-01 12:00:00 |
68 |
| Acapulco |
10 |
Valid |
Acapulcoite |
1914 |
Fell |
01/01/1976 12:00:00 AM |
16.88333 |
-99.90000 |
(16.88333, -99.9) |
1976-01-01 12:00:00 |
44 |
| Achiras |
370 |
Valid |
L6 |
780 |
Fell |
01/01/1902 12:00:00 AM |
-33.16667 |
-64.95000 |
(-33.16667, -64.95) |
1902-01-01 12:00:00 |
118 |
| Adhi Kot |
379 |
Valid |
EH4 |
4239 |
Fell |
01/01/1919 12:00:00 AM |
32.10000 |
71.80000 |
(32.1, 71.8) |
1919-01-01 12:00:00 |
101 |
| Adzhi-Bogdo (stone) |
390 |
Valid |
LL3-6 |
910 |
Fell |
01/01/1949 12:00:00 AM |
44.83333 |
95.16667 |
(44.83333, 95.16667) |
1949-01-01 12:00:00 |
71 |
data exploration
logg mass
meteorites = meteorites %>%
filter( recency >= 0) %>%
mutate(
log_mass = log10(mass)
)
ggplot(meteorites, aes(x=log_mass)) + geom_histogram(col = "black")

Recency in years
meteorites = meteorites %>%
filter( recency >= 0, recency < 200)
ggplot(meteorites, aes(x=recency)) + geom_histogram(col = "black")

Meteorite class
meteorites %>%
group_by(recclass) %>%
summarise(n=n()) %>%
arrange(desc(n)) %>%
head(10) %>%
kable()
| L6 |
8275 |
| H5 |
7119 |
| L5 |
4775 |
| H6 |
4508 |
| H4 |
4192 |
| LL5 |
2760 |
| LL6 |
2037 |
| L4 |
1218 |
| H4/5 |
425 |
| CM2 |
415 |
leaflet map
Interactive map of astroid locations
reds <- colorNumeric("Reds", domain = NULL)
leaflet(
data = meteorites,
width = "1400px", height = "1100px",
) %>%
addTiles() %>%
setView(5,50, zoom = 5) %>%
addCircleMarkers(
~reclong, ~reclat,
label = ~name,
radius = ~0.8*log_mass,stroke = TRUE, weight = 2,
fillOpacity = .75,
color = ~reds(recency)
) %>%
addLegend(
pal = reds,
values = ~recency,
group = "circles", position = "bottomleft", title = "recency (in years)"
)
## Warning in validateCoords(lng, lat, funcName): Data contains 7201 rows with either missing or invalid lat/lon values and will be ignored